<?php
session_start();
require_once("include/fct.inc.php");
require_once ("include/class.pdotickets.inc.php");
include("vues/v_entete.php");
$pdo = PdoGsb::getPdoGsb();
$estConnecte = estConnecte();
if (!isset($_REQUEST['uc'])) {
    $_REQUEST['uc'] = 'accueil';
    
}
$uc = $_REQUEST['uc'];

switch ($uc) {

    case'accueil': {
            include("controleurs/c_accueil.php");
            break;
        }
    case 'connexion': {
            include("controleurs/c_connexion.php");
            break;
        }
    case'creationDemande': {
            include("controleurs/c_creationDemande.php");
            break;
        }
        
   case 'listeDemandes': {
                    if(estConnecte()){
                        if($_SESSION['status']=="Operateur"){
                            include("vues/v_menu_operateur.php");
                        }
                        if($_SESSION['status']=="Superviseur"){
                            include("vues/v_menu_superviseur.php");
                        }
                        if($_SESSION['status']=="Expert"){
                            include("vues/v_menu_expert.php");
                        }
                        
                        include("controleurs/c_gestionDemande.php");
			break;
                    }
			
		}
	case 'changeTheme': {
                    if(estConnecte()){
                        if($_SESSION['status']=="Operateur"){
                            include("vues/v_menu_operateur.php");
                        }
                        if($_SESSION['status']=="Superviseur"){
                            include("vues/v_menu_superviseur.php");
                        }
                        if($_SESSION['status']=="Expert"){
                            include("vues/v_menu_expert.php");
                        }
                        
                        include("controleurs/c_gestionTheme.php");
			break;
                    }
			
		}
	
	
	
	case 'statistiques': {
			if(estConnecte()){
			
				if($_SESSION['status']=="Superviseur"){
					include("vues/v_menu_superviseur.php");
				}
				include("controleurs/c_gestionDemande.php");
			  
			}
		break;	
	
			}
			
	case 'recherche': {
                    if(estConnecte()){
                        if($_SESSION['status']=="Operateur"){
                            include("vues/v_menu_operateur.php");
                        }
                        if($_SESSION['status']=="Superviseur"){
                            include("vues/v_menu_superviseur.php");
                        }
                        if($_SESSION['status']=="Expert"){
                            include("vues/v_menu_expert.php");
                        }
                        
                        include("controleurs/c_gestionDemande.php");
			break;
                    }
			
		}
	case 'listeDemandesExpert': {
            if (estConnecte()) {

                if ($_SESSION['status'] == "Expert") {
                    include("vues/v_menu_expert.php");
                }
                include("controleurs/c_gestionDemande.php");
            }
            break;
        }
			
		
   default :{
		include("controleurs/c_accueil.php");
		break;
	}
}
include("vues/v_piedDePage.php");
?>
